#ifndef EDITOR_ITEM_FACTORY_H
#define EDITOR_ITEM_FACTORY_H

#include <ieditoritem.h>

#include <QtCore/QHash>

namespace swp
{

class EditorItemFactory
{
public:
    static EditorItemFactory* getInstance();
    static void destroy();

    void registerEditorItem(int type, core::IEditorItem* item);
    void unregisterEditorItem(int type);
    core::IEditorItem* editorItem(int type) const;

private:
    EditorItemFactory();
    ~EditorItemFactory();

private:
    QHash<int, core::IEditorItem*> m_registeredEditorItems;
};

} // namespace swp

#endif
